﻿using System;
using UnityEngine;

// Token: 0x02000007 RID: 7
public class BreadTransform : MonoBehaviour
{
	// Token: 0x06000027 RID: 39 RVA: 0x00006DBC File Offset: 0x00004FBC
	private void Update()
	{
		if (Input.GetKeyDown(this.exploCode[this.sequenceIndex]))
		{
			int num = this.sequenceIndex + 1;
			this.sequenceIndex = num;
			if (num == this.exploCode.Length)
			{
				this.sequenceIndex = 0;
				if (GameManager.main.playerBody.skinnable)
				{
					GameManager.main.playerBody.headSprites = this.headSprites;
					GameManager.main.playerBody.torsoSprites = this.torsoSprites;
					GameManager.main.playerBody.handSprites = this.handSprites;
					foreach (Rigidbody2D rigidbody2D in GameManager.main.playerBody.feet)
					{
						rigidbody2D.GetComponent<SpriteRenderer>().sprite = this.feetSprite;
					}
					GameManager.main.playerBody.bloodColor = this.bloodcolor;
					GameManager.main.playerBody.lookDir = -GameManager.main.playerBody.lookDir;
					GameManager.main.playerBody.dizzyIconColor = this.indicatorColor;
					GameManager.main.playerBody.skinnable = false;
					return;
				}
			}
		}
		else if (Input.anyKeyDown)
		{
			this.sequenceIndex = 0;
		}
	}

	// Token: 0x0400009B RID: 155
	public KeyCode[] exploCode;

	// Token: 0x0400009C RID: 156
	private int sequenceIndex;

	// Token: 0x0400009D RID: 157
	public Sprite[] headSprites;

	// Token: 0x0400009E RID: 158
	public Sprite[] torsoSprites;

	// Token: 0x0400009F RID: 159
	public Sprite[] handSprites;

	// Token: 0x040000A0 RID: 160
	public Sprite feetSprite;

	// Token: 0x040000A1 RID: 161
	public Color bloodcolor;

	// Token: 0x040000A2 RID: 162
	public Color indicatorColor;
}
